package com.lu.model.constant;

import cn.hutool.core.util.StrUtil;

/**
 * @Description redis key
 * @Author: zhanglu
 * @Date: 2022/7/20 17:00
 */
public class RedisKeyConstants {

  public static final String SYS_USER_ROLE_RESOURCE_MANAGE_KEY = "SYS_USER_ROLE_RESOURCE_MANAGE_KEY";
  public static final String ACCESS_TOKEN_EXPIRED_TIME = "ACCESS_TOKEN_EXPIRED_TIME";

  public static String loginUser(Object userId){
    return StrUtil.format("SYS_ADMIN_LOGIN_USER:{}", userId);
  }

  /**
   * 用户卡片积分账户操作
   * @param userId
   * @return
   */
  public static String userCardIntegral(Long userId){
    return StrUtil.format("USER_CARD_INTEGRAL:{}", userId);
  }

  /**
   * 快递物流编码
   * @param carrier
   * @return
   */
  public static String orderDeliveryCodeKey(String carrier){
    return StrUtil.format("ORDER_DELIVERY_CODE:{}", carrier);
  }

  /**
   * 快递物流信息
   * @param no
   * @return
   */
  public static String orderDeliveryKey(String no){
    return StrUtil.format("ORDER_DELIVERY:{}", no);
  }

}
